#include <iostream>
#include <sstream>
using namespace std;

void triangle(ostream& outs, unsigned int m, unsigned int n)
{
	if( m <= n )
	{
		for (int i = 0; i < m; i++)
		{
			outs << "*";
		}
		outs <<endl;
		triangle(outs , m+1, n);

		for (int i = 0; i < m; i++)
		{
			outs << "*";
		}
		outs <<endl;
	}
	
}

int main()
{
	triangle(cout, 3,5);
	system("pause");
}